package com.decoration.basic.util;

import com.decoration.basic.mapper.DecPictureMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component("ComServiceImpl")
public class ComServiceImpl {

    @Resource
    private DecPictureMapper pictureMapper;

    public String getIdByAddress(String address){
        if (StringUtil.isEmpty(address)){
            return null;
        }
        List<Integer> res = pictureMapper.getIdByAddress(address);

        if (res != null && res.size() == 1){
            return res.get(0).toString();
        }
        return null;
    }
}
